Practical estimation of rotation distance and induced partial order for binary trees
نویسنده
چکیده
Tree rotations (left and right) are basic local deformations allowing to transform between two unlabeled binary trees of the same size. Hence, there is a natural problem of practically finding such transformation path with low number of rotations, the optimal minimal number is called the rotation distance. Such distance could be used for instance to quantify similarity between two trees for various machine learning problems, for example to compare hierarchical clusterings or arbitrarily chosen spanning trees of two graphs, like in SMILES notation popular for describing chemical molecules. There will be presented inexpensive practical greedy algorithm for finding a short rotation path, optimality of which has still to be determined. It uses introduced partial order for binary trees of the same size: t1 ≤ t2 iff t2 can be obtained from t1 by a sequence of only right rotations. Intuitively, the shortest rotation path should go through the least upper bound or the greatest lower bound for this partial order. The algorithm finds a path through candidates for both points in representation of binary tree as stack graph: describing evolution of content of stack while processing a formula described by a given binary tree. The article is accompanied with Mathematica implementation of all used procedures (Appendix).
منابع مشابه
A Motzkin filter in the Tamari lattice
The Tamari lattice of order n can be defined on the set Tn of binary trees endowed with the partial order relation induced by the well-known rotation transformation. In this paper, we restrict our attention to the subset Mn of Motzkin trees. This set appears as a filter of the Tamari lattice. We prove that its diameter is 2n − 5 and that its radius is n − 2. Enumeration results are given for jo...
متن کاملOn the rotation distance between binary trees
We develop combinatorial methods for computing the rotation distance between binary trees, i.e., equivalently, the flip distance between triangulations of a polygon. As an application, we prove that, for each n, there exist size n trees at distance 2n − O( √ n). If T, T ′ are finite binary rooted trees, one says that T ′ is obtained from T by one rotation if T ′ coincides with T except in the n...
متن کاملAn Optimal Rotation Distance Set
A rotation in a binary tree is a local restructuring that changes the tree into another and preserves the inorder sequence. The rotation distance between two binary trees is the minimum number of rotations needed to transform one into another. However, a polynomial-time algorithm for computing rotation distances between any two binary trees has still not been found. Lucas (The Computer Journal,...
متن کاملRestricted rotation distance between binary trees
Restricted rotation distance between pairs of rooted binary trees measures differences in tree shape and is related to rotation distance. In restricted rotation distance, the rotations used to transform the trees are allowed to be only of two types. Restricted rotation distance is larger than rotation distance, since there are only two permissible locations to rotate, but is much easier to comp...
متن کاملBounding restricted rotation distance
Restricted rotation distance between pairs of rooted binary trees quantifies differences in tree shape. Cleary exhibited a linear upper bound of 12n for the restricted rotation distance between two trees with n interior nodes, and a lower bound of (n − 1)/3 if the two trees satisfy a reduction condition. We obtain a significantly improved sharp upper bound of 4n− 8 for restricted rotation dista...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- CoRR
دوره abs/1610.06023 شماره
صفحات -
تاریخ انتشار 2016